<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>教育缴费</title>
    <link rel="stylesheet" href="./static/css/web.css"/>
    <link rel="stylesheet" href="./static/css/payment.css">
    <link rel="stylesheet" href="./static/bootstrap/css/bootstrap.css">
</head>
<body style="background: #e7e8eb;">
<div id="app" v-cloak>
    <div style="margin: 20px;min-height:300px;">
        <div class="header-title dline">
            <h3>修改{{info.itemName}}金额</h3>
            <p>对某个学生的项目金额进行修改</p>
        </div>
        <div style="margin:30px 0;">
            <form>
                <div class="form-group">
                    <label>项目名称：</label>
                    <label>{{info.itemName}}</label>
                </div>

                <div class="form-group">
                    <label>金额：</label>
                    <input type="number" v-model="info.amount" placeholder="请输入金额" class="form-control"
                           style="width:120px;">
                </div>

                <div style="margin:30px 0;">
                    <button type="button" class="btn btn-primary" @click="saveData">提交</button>
                </div>
            </form>
        </div>
    </div>
</div>
</body>

</html>
<script type="text/javascript" src="./static/js/vue.min.js"></script>
<script type="text/javascript" src="./static/js/utils.js"></script>
<script type="text/javascript" src="./static/js/jquery.js"></script>
<script type="text/javascript" src="./static/js/layer/layer.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.19.2/axios.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/qs/6.9.4/qs.min.js"></script>
<script type="text/javascript">
    let vm = new Vue({
        el: '#app',
        data: {info: {}},
        methods: {
            saveData: function () {
                let _this = this;
                postWithData("/paydetail/reviseAmount", _this.info, function (result) {
                    if (result.flag) {
                        showMessage("修改金额成功.");
                        setTimeout(function () {
                            layer.close(layer.index);
                        }, 1000)

                    } else {
                        showMessage("操作失败：" + result.msg)
                    }
                })
            }
        },
        created: function () {
            this.info.id = getQueryParam("id");
            this.info.itemName = getQueryParam("itemName");
        }
    });


</script>